<template>
<div id="home" >
  <vue-particles
    color="#dedede"
    :particleOpacity="0.7"
    :particlesNumber="40"
    shapeType="star"
    :particleSize="4"
    linesColor="#FFFFFF"
    :linesWidth="2"
    :lineLinked="true"
    :lineOpacity="0.4"
    :linesDistance="150"
    :moveSpeed="3"
    :hoverEffect="true"
    hoverMode="grab"
    :clickEffect="true"
    clickMode="push"
    class="cash"
  >
  </vue-particles>
  <div class="header">
    <div class="nav-item">WORKSPACE
      <svg class="icon" aria-hidden="true">
        <use xlink:href="#icon-renwu"></use>
      </svg>
    </div>
    <div class="nav-item">Manage workspace
      <svg class="icon" aria-hidden="true">
        <use xlink:href="#icon-xinxi"></use>
      </svg>
    </div>
    <div class="nav-item">Back
      <svg class="icon" aria-hidden="true">
        <use xlink:href="#icon-faxian"></use>
      </svg>
    </div>
    <div class="nav-item" @click="goToHomePage">Homepage
      <svg class="icon" aria-hidden="true">
        <use xlink:href="#icon-shouye"></use>
      </svg>
    </div>
  </div>
  <div class="main">
        <div id="app" >
          <div style="display: flex; width: 100%; height: 100%">
            <div style="width: 20%">
              <el-aside width="100%" style="background-color: rgb(233, 241, 246)">
                <el-menu :router=true :default-active="$route.name" unique-opened="true">
                  <el-submenu index="1">
                    <template slot="title"><i class="el-icon-chicken"></i>name1</template>
                    <el-menu-item-group>
                      <el-menu-item index="test1">test1</el-menu-item>
                      <el-menu-item index="test2">test2</el-menu-item>
                      <el-menu-item index="test3">test3</el-menu-item>
                      <el-menu-item index="test4">test4</el-menu-item>
                    </el-menu-item-group>
                  </el-submenu>
                  <el-submenu index="2">
                    <template slot="title"><i class="el-icon-chicken"></i>name2</template>
                    <el-menu-item-group>
                      <el-menu-item index="test1">test1</el-menu-item>
                      <el-menu-item index="test2">test2</el-menu-item>
                      <el-menu-item index="test3">test3</el-menu-item>
                      <el-menu-item index="test4">test4</el-menu-item>
                    </el-menu-item-group>
                  </el-submenu>

                </el-menu>
              </el-aside>
            </div>
            <div style="width: 80%">
              <router-view></router-view>
            </div>
          </div>
        </div>
    </div>
    <div class="form">
      <input type="text" placeholder="get" />
      <input type="text" placeholder="url:" />
      <div class="input1">
      <input type="text" placeholder="tests:" />
      </div>
      <div class="button">
        <button>run</button>
        <button>cancel</button>
      </div>
    </div>
  </div>

</template>

<script>
export default {
  data() {
    return {
      menuList: [
        {
          name: 'name1',
          child: ['test1', 'test2', 'test3', 'test4']
        }
      ]
    }
  },
  created() {},
  methods: {
    goToHomePage() {
      this.$router.push('homePage');
    }
  }
};
</script>
<style>
  .cash {
    position:fixed;
    top:180px;
    width:100%;
  }
ul,
li {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-size: 25px;
}
#home {
  width: 100vw;
  height: 100vh;
  background: url("../assets/view2.jpg") no-repeat;
  background-size: cover;
  background-position: left;
  overflow: hidden;
  opacity:0.8;
  font-family: FZShuTi;
  font-size: 35px;
}
.header {
  height: 50px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav{
  width: 20%;
  position: absolute;
  text-align: center;
  left: 0;
  top: 0;
}
.nav-item {
  height: 100%;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc;
  box-shadow: 1px 1px 1px 1px #ffb6c1;
  cursor: pointer;
}

.nav-item:active,

button:active{
  background-color: lightblue;
  color: #ffffff;
}

.title:active ~ .lt-menu {
  display: block;
}

.main {
  width: 100%;
  height: 100%;
  position: relative;
}

.form {
  /*width: 400px;*/
  /*display: flex;*/
  /*flex-direction: column;*/
  /*position: absolute;*/
  /*left: 50%;*/
  /*top:50%;*/
  /*transform: translate(-50%,-50%);*/
  width: 410px;
  height: 400px;
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 50%;
  top:50%;
  transform: translate(-50%,-50%);
  background-color:rgba(255,255,255,0.7);
}
.input1 {
  height: 100px;
}
input {
  height: 50px;
  border: 1px solid #ccc;
  box-shadow: 1px 1px 1px 1px #ffb6c1;
  margin-bottom: 30px;
  width: 400px;
  font-family: FZShuTi;
  font-size: 30px;
}

button{
  height: 50px;
  border: 1px solid #fff;
  margin-bottom: 30px;
  width: 150px;
  cursor: pointer;
  background-color: #ffffff;
  font-family: FZShuTi;
  font-size: 30px;
}

.form div{
  display: flex;
  align-items: center;
  justify-content: space-between;/*弹性布局*/
}
  #app {
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: left;
    overflow: hidden;
    opacity:0.8;
    position: absolute;
    display: flex;
    position: absolute;
    justify-content: center;
    left: 0;
    top: 0;
    overflow: auto;
  }
</style>
